package com.wzh.dao;

import com.wzh.pojo.Po.Notes;
import com.wzh.pojo.Po.UserZp;
import com.wzh.pojo.Req.DataReq;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface NoteDao {

	@Insert("insert into NOTES (name,phone,sex,age,nation,degree,institutions,major,intension,salary,email,certificate,resume,nativeplace) value (#{name},#{phone},#{sex},#{age},#{nation},#{degree},#{institutions},#{major},#{intension},#{salary},#{email},#{certificate},#{resume},#{nativeplace})")
	Integer addnote(Notes notes);

//	@Select("select * from NOTES")
	List<Notes> findnotes(DataReq req);

	@Select("select * from NOTES where phone=#{phone}")
	List<Notes> findNoteByPhone(UserZp userZp);
}
